]> git.r.bdr.sh - rbdr/super-polarity/blobdiff - Super Polarity/Widget.cs
Removes spaces.
[rbdr/super-polarity] / Super Polarity / Widget.cs
diff --git a/Super Polarity/Widget.cs b/Super Polarity/Widget.cs
deleted file mode 100644 (file)
index 65c3fd2..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace SuperPolarity
-{
-    class Widget
-    {
-        public IList<Widget> Children;
-        public Dictionary<string, List<Action<float>>> Listeners;
-
-        public virtual void AppendChild(Widget widget)
-        {
-            Children.Add(widget);
-        }
-
-        public virtual void Bind(string eventName, Action<float> eventListener)
-        {
-            List<Action<float>> newListenerList;
-            List<Action<float>> listenerList;
-            bool foundListeners;
-
-            if (!Listeners.ContainsKey(eventName))
-            {
-                newListenerList = new List<Action<float>>();
-                Listeners.Add(eventName, newListenerList);
-            }
-
-            foundListeners = Listeners.TryGetValue(eventName, out listenerList);
-
-            listenerList.Add(eventListener);
-        }
-
-        public virtual void Unbind(string eventName, Action<float> eventListener)
-        {
-            // NOT YET IMPLEMENTED;
-        }
-
-        public virtual void Dispatch(string eventName, float value)
-        {
-            List<Action<float>> listenerList;
-            bool foundListeners;
-
-            foundListeners = Listeners.TryGetValue(eventName, out listenerList);
-
-            if (!foundListeners)
-            {
-                return;
-            }
-
-            foreach (Action<float> method in listenerList)
-            {
-                method(value);
-            }
-        }
-    }
-}